<div id="plants-display-area">
	<form action="<?php echo $config_file['web_root']?>/php/admin/plant_admin.php" method="post" onsubmit="AjaxFormPost.send(this,plantUpdatePostCallback); return false;">
		<input type="hidden" name="func" value="E">
	<div class="page-spanner">
		<table id="form-table" border="0" align="left" cellspacing="0" cellpadding="0">
			<tr>
				<td>
					<span class="form-field">Plants<br>
						<select name="plant-id" id="plant-id" onchange="loadPlantData(this)">
							<option value="0">New Plant</option>
						</select>
					</span>
				</td>
			</tr>
			<tr>
				<td>
					<span class="form-field">Name [Required, max 100 charecters]:<br><input class="textbox" name="plant-name" id="plant-name" max-length="100" size="100"></span>
				</td>
			</tr>
			<tr>
				<td>
					<span class="form-field">Availability<br>
						<select name="availability" id="availability">
							<option value="0">Few</option>
							<option value="1">Plenty</option>
							<option value="-1">None</option>
						</select>
					</span>
				</td>
			</tr>
			<tr><td><span class="form-field"><input type="submit" id="submit-button" class="active" name="submit" onclick="inactivate(this)" value="Submit"/></span></td></tr>
		</table>
	</div>
	</form>
</div>
<script type="text/javascript">
function loadPlantData(plantSel) {
	if (plantSel.value != 0) {
		Ajax.call("POST",webRoot + "/php/admin/plant_admin.php","func=I&plant-id=" + plantSel.value,plantLoadCallback,false);
	} else {
		document.getElementById("plant-name").value = "";
		document.getElementById("availability").selectedIndex = 0;
	}
}
</script>
